library internal;
import 'dart:html';
import 'dart:math';
import 'package:priority_queue/priority_queue.dart';
part 'node.dart';
part 'doubly-linked-list.dart';
part 'line.dart';
part 'screen.dart';
part 'position.dart';
part 'buffer.dart';
part 'cursor.dart';
part 'selection.dart';
part 'actions.dart';

bool dev = false;

void argErr (Object obj) { throw new ArgumentError('invalid argument $obj'); }
void staErr (Object obj) { throw new StateError('invariants of $obj broken'); }
void unsErr (Object obj) { throw new UnsupportedError('cannot call this method on $obj'); }

const int BACKSPACE = 8;
const int TAB = 9;
const int ENTER = 13;
const int DELETE = 46;

const int LEFT = 37;
const int RIGHT = 39;
const int UP = 38;
const int DOWN = 40;

const int HOME = 36;
const int END = 35;
const int PAGE_UP = 33;
const int PAGE_DOWN = 34;

const int CUT = 88;
const int COPY = 67;
const int PASTE = 86;

List<int> badKeys = [BACKSPACE,TAB,ENTER,DELETE,
                     LEFT,RIGHT,UP,DOWN,
                     HOME,END,PAGE_UP,PAGE_DOWN];
